package com.ynny;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HotspotController {
    @GetMapping("/hotspot")
    @SentinelResource(value = "hotspot", blockHandler = "handle",
            blockHandlerClass = HotspotBlockHandler.class)
    public String getHotspot(@RequestParam(value = "type", required = false)String type,
            @RequestParam(value = "size", required = false)  String size){
    return "进入热点";
    }
}
